import { Controller, Get } from "@nestjs/common";
import { AuthGuard } from "./auth.guard";
import { Roles } from "./role.decorator";
import { UseGuards } from "@nestjs/common";
@Controller("accounts")
export class AccountController {
  @Get()
  @UseGuards(AuthGuard)
  @Roles("admin") //用来表明哪些角色可以访问此路由
  async index() {
    return "this account  return all acounts";
  }
}
